package com.ruoyi.cinema.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;
import java.util.List;
import java.util.Objects;

/**
 * 影片对象 film
 *
 * @author HHAOYU
 * @date 2020-12-07
 */
@TableName("film")
public class Film extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    @TableId(value = "id")
    private Long id;
    /** 影片编码(国家编码) */
   // @Excel(name = "影片编码(国家编码)")
   // private String filmCode;
    /** 影片名称 */
    @Excel(name = "影片名称")
    private String filmName;
    /** 影片版本 普通 立体 */
//    @Excel(name = "影片版本 普通 立体")
//    private String filmVersion;
    /** 本地版本 2D 3D */
//    @Excel(name = "本地版本 2D 3D")
//    private String localFilmVersion;
    /** 发行时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发行时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date publishDate;
    /** 首映时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "首映时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date showDate;
    /** 海报 */
    @Excel(name = "海报")
    private String poster;
    /** 评分 */
    @Excel(name = "评分")
    private String rating;
    /** 导演 */
    @Excel(name = "导演")
    private String directors;
    /** 演员 */
    @Excel(name = "演员")
    private String actors;
    /** 简介 */
    private String introduction;
    /** 影片类型 冒险  */
    @Excel(name = "影片类型 冒险 ")
    private String filmType;
    /** 国家 */
    private String country;
    /** 时长 */
    @Excel(name = "时长")
    private String duration;
    /** 预告片 */
    @Excel(name = "预告片")
    private String trailers;

    @TableField(exist=false)
    private List<String> filmStillList;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
//    public void setFilmCode(String filmCode)
//    {
//        this.filmCode = filmCode;
//    }
//
//    public String getFilmCode()
//    {
//        return filmCode;
//    }
    public void setFilmName(String filmName)
    {
        this.filmName = filmName;
    }

    public String getFilmName()
    {
        return filmName;
    }
//    public void setFilmVersion(String filmVersion)
//    {
//        this.filmVersion = filmVersion;
//    }
//
//    public String getFilmVersion()
//    {
//        return filmVersion;
//    }
//    public void setLocalFilmVersion(String localFilmVersion)
//    {
//        this.localFilmVersion = localFilmVersion;
//    }
//
//    public String getLocalFilmVersion()
//    {
//        return localFilmVersion;
//    }
    public void setPublishDate(Date publishDate)
    {
        this.publishDate = publishDate;
    }

    public Date getPublishDate()
    {
        return publishDate;
    }
    public void setShowDate(Date showDate)
    {
        this.showDate = showDate;
    }

    public Date getShowDate()
    {
        return showDate;
    }
    public void setPoster(String poster)
    {
        this.poster = poster;
    }

    public String getPoster()
    {
        return poster;
    }
    public void setRating(String rating)
    {
        this.rating = rating;
    }

    public String getRating()
    {
        return rating;
    }
    public void setDirectors(String directors)
    {
        this.directors = directors;
    }

    public String getDirectors()
    {
        return directors;
    }
    public void setActors(String actors)
    {
        this.actors = actors;
    }

    public String getActors()
    {
        return actors;
    }
    public void setIntroduction(String introduction)
    {
        this.introduction = introduction;
    }

    public String getIntroduction()
    {
        return introduction;
    }
    public void setFilmType(String filmType)
    {
        this.filmType = filmType;
    }

    public String getFilmType()
    {
        return filmType;
    }
    public void setCountry(String country)
    {
        this.country = country;
    }

    public String getCountry()
    {
        return country;
    }
    public void setDuration(String duration)
    {
        this.duration = duration;
    }

    public String getDuration()
    {
        return duration;
    }
    public void setTrailers(String trailers)
    {
        this.trailers = trailers;
    }

    public String getTrailers()
    {
        return trailers;
    }

    public List<String> getFilmStillList() {
        return filmStillList;
    }

    public void setFilmStillList(List<String> filmStillList) {
        this.filmStillList = filmStillList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            //.append("filmCode", getFilmCode())
            .append("filmName", getFilmName())
           // .append("filmVersion", getFilmVersion())
           // .append("localFilmVersion", getLocalFilmVersion())
            .append("publishDate", getPublishDate())
            .append("showDate", getShowDate())
            .append("poster", getPoster())
            .append("rating", getRating())
            .append("directors", getDirectors())
            .append("actors", getActors())
            .append("introduction", getIntroduction())
            .append("filmType", getFilmType())
            .append("country", getCountry())
            .append("duration", getDuration())
            .append("trailers", getTrailers())
            .toString();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Film film = (Film) o;
        return Objects.equals(id, film.id) &&
                Objects.equals(filmName, film.filmName) &&
                Objects.equals(publishDate, film.publishDate) &&
                Objects.equals(showDate, film.showDate) &&
                Objects.equals(poster, film.poster) &&
                Objects.equals(rating, film.rating) &&
                Objects.equals(directors, film.directors) &&
                Objects.equals(actors, film.actors) &&
                Objects.equals(introduction, film.introduction) &&
                Objects.equals(filmType, film.filmType) &&
                Objects.equals(country, film.country) &&
                Objects.equals(duration, film.duration) &&
                Objects.equals(trailers, film.trailers);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, filmName, publishDate, showDate, poster, rating, directors, actors, introduction, filmType, country, duration, trailers);
    }
}
